{include file="public/header" /}

<style type="text/css">
	.right-mob .article-mod li{margin-bottom: 0;line-height: 25px;}
	.content img{max-width: 100%;}
</style>
<div class="container mtb-15">
	<div class="col-md-9 left-box">
		<!-- <ul class="label-list">
			<li class="jump {eq name='module' value='help'}on{/eq}" href="{:url('Help/index', ['module' => 'help'])}">常见问题</li>
			<li class="jump {eq name='module' value='operate'}on{/eq}" href="{:url('Help/index', ['module' => 'operate'])}">操作手册</li>
		</ul> -->
		<div class="list-box mt-15">
			<div class="list-body article-list">
				{volist name="list" id="rs"}
				<a name="article-{$rs['article_id']}"></a>
				<div class="article-item">
					<div class="article-body">
						<div class="title"><a>{$rs['title']}</a></div>
						<div class="content" style="height: auto;overflow: auto;">{$rs['content']}</div>
					</div>
				</div>
				{/volist}
			</div>
		</div>
	</div>
	<div class="col-md-3 right-box">
		<div class="directory">
			<div class="right-mob">
				<div class="title">
					{eq name='module' value='help'}常见问题{/eq}
					{eq name='module' value='operate'}操作手册{/eq}
				</div>
				<ul class="article-mod">
					{volist name="list" id="rs"}
						<li class="{eq name='key' value='0'}active{/eq}" data-name="article-{$rs['article_id']}">{$rs['title']}</li>
					{/volist}
				</ul>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	// 滚动条选中
	function scroll_select(){
		var cur_scroll = $(document).scrollTop();
		$(".directory ul li").each(function(index,item){
			var name = $(this).attr('data-name');
			
			var scroll = $("a[name='"+name+"']").offset().top;
			if(scroll < cur_scroll + 50){
				$(".directory ul li").removeClass('active');
				$(this).addClass('active');
			}
		})
	}
	$(document).ready(function(){
		scroll_select();
		$(window).scroll(function(){
			scroll_select()
		});
		var left = $(".right-box").offset().left + 20 ;
		var top  = $(".right-box").offset().top ;
		$(".directory").css({left:left + 'px', top:top + 'px'});
	});
</script>
<script type="text/javascript">
	$(".directory ul li").on('click', function(e){
		var name = $(this).attr('data-name');
		$('body,html').animate({scrollTop:$('a[name='+ name +']').offset().top -65},1000);
	})
</script>

{include file="public/footer" /}